package com.foryou.wechat.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * Created by Lee.
 */
@Data
@TableName("v_user")
@NoArgsConstructor
public class UserEntity extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String nickname;
    private String avatarUrl;
    private Date birthday;
    private String constellation;
    private int gender;
    private String region;
    private String province;
    private int capacity;
    private String backgroundUrl;
    private String phone;
    private String weChat;
    private String weibo;
    private String openId;

    public UserEntity(String nickname, String avatarUrl, int gender, String openId) {
        this.nickname = nickname;
        this.avatarUrl = avatarUrl;
        this.gender = gender;
        this.openId = openId;
    }

    public UserEntity(Long id, Date birthday, int gender, String region, String province,
                      int capacity, String phone, String weChat, String weibo) {
        this.id = id;
        this.birthday = birthday;
        this.gender = gender;
        this.region = region;
        this.province = province;
        this.capacity = capacity;
        this.phone = phone;
        this.weChat = weChat;
        this.weibo = weibo;
    }
}
